# 嘉宾 测试用例层
from interface.Guest import Guest


class GuestCase:
    def __init__(self):
        self.guest = Guest()

    # 添加嘉宾
    def test01_add_guest(self):
        body = {
            "eid": 1234,
            "realname": '旺财',
            "phone": 12345678911,
            "email": '1130780712@qq.com'
        }
        result = self.guest.add_guest(body)
        print(result)
        # 断言status
        status = result.get('body').get('status')
        assert status == 10200
        # 断言message
        message = result.get('body').get('message')
        assert message == 'add guest success'

    # 查询嘉宾
    def test02_get_guest(self):
        result = self.guest.get_guest(eid=1234)
        print(result)
        # 断言status
        status = result.get('body').get('status')
        assert status == 10200
        # 断言message
        message = result.get('body').get('message')
        assert message == 'success'

    # 嘉宾签到
    def test03_sign_guest(self):
        result = self.guest.get_guest(eid=1234)
        print(result)
        # 断言status
        status = result.get('body').get('status')
        assert status == 10200
        # 断言message
        message = result.get('body').get('message')
        assert message == 'success'


if __name__ == '__main__':
    # GuestCase().test01_add_guest()
    # GuestCase().test02_get_guest()
    GuestCase().test03_sign_guest()
